package cl.uchile.sti.authorization.model;

import org.codehaus.jackson.map.ObjectMapper;

import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * User: Julio Villane
 * Date: 14-12-12
 * Time: 10:22 AM
 */
public abstract class Entidad {

    private static ObjectMapper mapper = new ObjectMapper();

    @Override
    public String toString(){
        try {
            return mapper.writeValueAsString(this);
        } catch (IOException e) {
            e.printStackTrace();
            return "error al mapear la entidad";
        }
    }
}
